home *** CD-ROM | disk | FTP | other *** search
/ Williams Sonoma Guide to Good Cooking / Williams Sonoma Guide to Good Cooking.iso / pc / SETUP32 / E_REG / include.js < prev    next >
Text File  |  2002-10-23  |  950b  |  61 lines

  1.  
  2.  
  3. //    Normalize = change to lower case
  4. function Normalize(word)
  5. {
  6.     return word.toLowerCase();
  7. }
  8.  
  9. //    Get key
  10. function GetKey(key)
  11. {
  12.     return window.external.GetConfigInfo('page\\' + key);
  13. }
  14.  
  15. function GetBrandKey(key)
  16. {
  17.     var brand = window.external.GetConfigInfo('Product_Identification\\Branding');
  18.     if (brand == '')
  19.     {
  20.         brand = 'Broderbund_Branding';
  21.     }
  22.  
  23.     return window.external.GetConfigInfo(brand + '\\' + key);
  24. }
  25.  
  26. //    Get key
  27. function GetKeyD(key, def)
  28. {
  29.     var val = GetKey(key);
  30.     if (val != '')
  31.         return val;
  32.     else
  33.         return def;
  34. }
  35.  
  36. function GetBrandKeyD(key, def)
  37. {
  38.     var val = GetBrandKey(key);
  39.     if (val != '')
  40.         return val;
  41.     else
  42.         return def;
  43. }
  44.  
  45. //    Get Normalized key 
  46. function GetVariable(key)
  47. {
  48.     return Normalize(GetKey(key));
  49. }
  50.  
  51. function GetContext()
  52. {
  53.     return window.external.GetContext();
  54. }
  55.  
  56. function isContext(context)
  57. {
  58.     return (Normalize(GetContext()) == Normalize(context));
  59. }
  60.  
  61.